Skip to content

feat: make it easier to toggle on/off paste summary in the tui#24869

Merged
rekram1-node merged 3 commits into
devfrom
tui-paste-summary
Apr 29, 2026
Merged

feat: make it easier to toggle on/off paste summary in the tui#24869
rekram1-node merged 3 commits into
devfrom
tui-paste-summary

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Issue for this PR

Relates to #8501

# Conflicts:
#	packages/opencode/src/cli/cmd/tui/app.tsx
@rekram1-node

Copy link
Copy Markdown
Collaborator Author

/review

Comment thread packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@rekram1-node rekram1-node merged commit 504ca3d into dev Apr 29, 2026
10 checks passed
@rekram1-node rekram1-node deleted the tui-paste-summary branch April 29, 2026 04:55
oleksii-honchar pushed a commit to oleksii-honchar/better-opencode that referenced this pull request Apr 29, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 9, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
thisxiangyu added a commit to thisxiangyu/opencode-fork that referenced this pull request Jun 15, 2026
将 upstream/dev (38adc13) 合并到 dev-custom,解决 14 个文件的合并冲突,
同时修复因上游模块迁移导致的构建错误。构建与 Smoke Test 全部通过。

## 上游主要更新

- **HttpApi 后端重构与完整测试覆盖**:authorization middleware、instance context、
  workspace routing、websocket proxy、SDK parity、Effect HttpApi backend parity。
- **桌面端修复**:路径匹配导致 sessions 丢失、强 ID、现有数据修复 (anomalyco#25013)。
- **模型支持**:新增 Mistral Medium 3.5 with reasoning (anomalyco#24996)。
- **参数调整**:Azure/DeepSeek 默认参数优化;系统提示词顺序调整为 Global → Project → Skills。
- **Session 路径**:新增按路径过滤 session 及禁用设置 (anomalyco#24849);数据库新增 session_path、
  icon_url_override 字段。
- **TUI 体验**:粘贴摘要开关更易用 (anomalyco#24869)。
- **内存泄漏修复**:Bash 工具释放解析后的语法树 (anomalyco#24861)。
- **MCP 健壮性**:无效 MCP URL 处理修复 (anomalyco#25019)。
- **核心模块迁移**:global、filesystem、flag、log、npm、effect 等大量底层模块从
  packages/opencode 迁移到 packages/core,建立更清晰的分层。
- **版本同步**:v1.14.30。

## 本地定制功能保全

以下本地特有功能在合并中完全保全,未受上游更新影响:

- **StrategyLoops 轻量框架**:StrategyLoops/ 目录下 PEE/MPEE 模块、Role/Session 管理、
  opencode 适配器等全部保留。
- **可配置存储路径**:database、log、worktree、snapshot 路径支持环境变量与配置文件自定义。
- **日志系统增强**:log-tee 模式(同时输出到文件与控制台)、可配置日志目录。
- **Snapshot 优化**:使用本地 ignore 库替代 git check-ignore,避免 Windows ENAMETOOLONG;
  文件夹级忽略的批量删除逻辑完整保留。
- **MCP 面板项目名提示**:status-popover-body.tsx 中当前项目名展示保留。
- **设置页路径展示**:settings-general.tsx 中 worktree/snapshot/config 路径加载与展示保留。
- **分叉版本构建工作流**、中文贡献文档、定制 i18n 键等全部保留。

## 冲突解决与代码整合

| 文件 | 冲突处理策略 |
|------|-------------|
| dialog-edit-project.tsx | 采用上游提取的 getProjectAvatarSource() 函数,同时保留本地 override/url/color 完整逻辑 |
| sidebar-items.tsx / layout.tsx | 整合上游头像来源逻辑,保留本地 icon override 与 color 判定 |
| settings-general.tsx | 保留本地 loadConfigFiles / loadWorktreeInfo / loadSnapshotInfo 及路径展示 UI;合并上游新增的 shell / displayBackend 等逻辑 |
| status-popover-body.tsx | 保留本地 projectName 提示;去除上游删除的废弃 load 状态 |
| config/config.ts | 采纳上游 Schema 修正(ConfigAgent.Info 替换 AgentRef;MCP 禁用配置改用 Schema.Struct) |
| server/event.ts | 保留本地 ConfigUpdated 事件定义,同时合并上游 Schema 化改造 |
| server/routes/global.ts | 完整保留本地特有的 /storage/* 与 /config/path 路由;合并上游模块导入路径重构 |
| snapshot/index.ts | 修正导入路径到 @opencode-ai/core/*,保留本地 ignore 库、StorageConfig、Flag 等全部定制 |
| worktree/index.ts | 同上,修正模块路径,保留本地 StorageConfig / Flag / resolveDir 等定制 |

## 构建修复(模块迁移适配)

上游将 global、flag 等模块迁移到 packages/core 后,本地定制代码出现模块解析失败:

1. **StorageConfig 跨包迁移**:将 storage-config.ts 从 opencode 包迁移到
   packages/core/src/storage/storage-config.ts,原位置改为重新导出;解除 core → opencode
   的反向依赖,避免循环依赖。
2. **依赖补充**:core/package.json 新增 jsonc-parser 依赖(原仅在 opencode 中声明)。
3. **导入路径修正**:core/src/util/log.ts、snapshot/index.ts、worktree/index.ts 中的
   ../global、../flag/flag、../storage/storage-config 等相对路径统一修正为
   @opencode-ai/core/* 路径。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant